﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using EasyToHelp.Entity;
using EasyToHelp.Service;
using Microsoft.AspNetCore.Cors;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace EasyToHelp.WEBAPI.Controllers
{
    public class SysUsersController : BaseController
    {
        private readonly ISysUsersService sysUsers;
       
        public SysUsersController(ISysUsersService _sysUsers )
        {
            sysUsers = _sysUsers;
          
        }
        [HttpGet("GetList")]
        public IEnumerable<SysUsers> GetList()
        {
            return sysUsers.GetUserList();
        }
        [HttpGet("GetModel/{UserName}/{UserPwd}")]
        public SysUsers GetModel(string UserName, string UserPwd)
        {
            SysUsers model = new SysUsers() {UserName= UserName,UserPwd= UserPwd };
            return sysUsers.GetSysUsers(model);
        }
    }
}